Northwind Test with Yukon

CustOrdersDetail Stored Procedure

Owner

dbo

Creation Date

10-07-2003 10:32:09

Remarks


Parameters

ParameterTypeSize
@OrderIDint4

Source Code

CREATE PROCEDURE CustOrdersDetail @OrderID int
AS
SELECT ProductName,
    UnitPrice=ROUND(Od.UnitPrice, 2),
    Quantity,
    Discount=CONVERT(int, Discount * 100), 
    ExtendedPrice=ROUND(CONVERT(money, Quantity * (1 - Discount) * Od.UnitPrice), 2)
FROM Products P, [Order Details] Od
WHERE Od.ProductID = P.ProductID and Od.OrderID = @OrderID